import 'package:flutter/material.dart';
import 'package:FlutterReader/page/favoriteChildren/show_favorite_page.dart';
import 'package:FlutterReader/page/search_page.dart';
import 'package:FlutterReader/page/settings_page.dart';


import '../generated/l10n.dart';
import '../wights/LeftSlideInButton.dart';

class FavoritePage extends StatefulWidget {
  @override
  State<FavoritePage> createState() => _FavoritePageState();
}

class _FavoritePageState extends State<FavoritePage> {
  final List<Widget> _pages=[
    ShowFavoritePage(),
  ];

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        elevation: 0,
        title: Text(S.of(context).favorite),
        actions: [
          LeftSlideInButton(
            myPageBuilder: (context) => SearchPage(),
            icon: Icon(Icons.search),
          ),
          // 这是一个自定义封装的settings按钮
          LeftSlideInButton(
            myPageBuilder: (context) => SettingsPage(),
            icon: Icon(Icons.settings),
          ),
        ],
      ),

      body: _pages[0], // 子页面
    );
  }
}